/*
    Space Simulation - Simulate the solar system
    Copyright (C) 2010  Guillaume Andrieu and Sylvain Martin

    This file is part of Space Simulation.

    Space Simulation is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Space Simulation is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Space Simulation.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 /*
 *Vector3D.h est le fichier d'en-tete des fonctions de Vector3D.c, la définition de la structure Vector3D
 * et la fonction de creation des vecteur3D.
 */


#ifndef _IMA4_VECTOR3D_H

#define _IMA4_VECTOR3D_H 

/*
 *  Structures des donnees
 */

typedef struct Vector3D Vector3D;
struct Vector3D
{
  double x;
  double y;
  double z;
};

/*
 *  Fonction constructeur
 */
Vector3D MakeVector3D(float x, float y, float z);

/*
 *  Produit Vectoriel
 */
Vector3D VectorCrossProduct(Vector3D v1, Vector3D v2);

/*
 *  Somme Vectorielle
 */
Vector3D VectorSum(Vector3D v1, Vector3D v2);

/*
 *  Produit salaire
 */
double VectorDotProduct(Vector3D v1, Vector3D v2);

/*
 *  Multiplication par un scalaire
 */
Vector3D VectorScalarMul(double s, Vector3D v);

/*
 *  Norme
 */
double VectorNorm(Vector3D v);

/*
 *  Angle entre deux vecteurs
 */
double VectorAngle(Vector3D v1, Vector3D v2);

/*
 * Vecteur unite : normalise un vecteur
 */
Vector3D VectorUnit(Vector3D v);

/*
 * Difference entre deux vecteurs (v1 - v2) 
 */
Vector3D VectorSubstract(Vector3D v1, Vector3D v2);

#endif
